package cn.foolishbird.crow.springmvc.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @author foolish bird
 */
@ApiModel("list请求参数")
public class ListRequest<T> implements Serializable {

    private static final long serialVersionUID = -159117421492006918L;

    @ApiModelProperty("数据")
    @NotNull(message = "数据不能为空")
    @Size(min = 1, message = "数据不能为空")
    private List<@Valid T> content;

    public List<T> getContent() {
        return content;
    }

    public void setContent(List<T> content) {
        this.content = content;
    }
}
